package com.mangosteen.interviewji.config;

import com.volcengine.ark.runtime.service.ArkService;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "ai")
@Data
public class AIConfig {
    private String apiKey;

    @Bean
    public ArkService aiService() {
        String apiKey=this.apiKey;
        //  .
        ArkService arkService = ArkService.builder().apiKey(apiKey).baseUrl("https://ark.cn-beijing.volces.com/api/v3").build();
        return arkService;
    }
}
